package cn.convert.convert;

import java.util.Map;

import org.apache.struts2.util.StrutsTypeConverter;

import cn.convert.entity.Change;

public class ChangeConvert extends StrutsTypeConverter{

	
	public Object convertFromString(Map context, String[] values, Class arg2) {
		String[] ChangeValues=values[0].split(",");
		int x=Integer.parseInt(ChangeValues[0]);
		int y=Integer.parseInt(ChangeValues[1]);
		Change change=new Change();
		change.setX(x);
		change.setY(y);
		return change;
	}

	
	public String convertToString(Map arg0, Object arg1) {
		
		return null;
	}

}
